Using the Evaluate Function
The Evaluate function enables you to send C# scripts to a .NET application. When you use the Evaluate function, you interact with an application's data models, instead of with the application's user interface. This enables you to use functionality that might not be supported by the standard .NET connector, and provides a quicker and more stable way to interact with .NET applications.
You can use the Evaluate function to pull information about orders with one call to the application, instead of reading dozens of screen elements.
You can use the Evaluate function to run a script on a .NET screen element, as well as on a WPF screen element within a .NET application. You can run scripts to get or set the properties of a screen element, and to execute any of the methods that are available for a screen element, such as clicking a button.
For examples of the scripts you can run on different screen element control types, see:
Running the Evaluate Function
-
Open the .NET application from which you want to capture screen elements, and then open the Real-Time Designer.
-
Use the Real-Time Designer to capture the required .NET screen elements (or WPF screen elements within a .NET application). For details on capturing screen elements, see Capturing a Screen Element.
-
Save and run the project, and then open the Monitor.
-
Click Screen Element.
-
From the screen element tree, select the screen element on which you want to run the Evaluate function.
-
Select the Functions tab.
-
From the Available Functions drop-down list, select Evaluate.
-
In the Value field for the script parameter, type the script.
-
Click Invoke.